package com.hnx.admin.aurora.system.domain.param.role.form;

import com.hnx.admin.aurora.annotation.KeyField;
import com.hnx.admin.aurora.annotation.RepeatTable;
import com.hnx.admin.aurora.annotation.ValidField;
import com.hnx.admin.aurora.web.json.BaseForm;
import lombok.Data;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/*
创建人： 倔强的头发
创建时间：2025/7/1
功能描述:

*/
@Data
@RepeatTable("sys_role")
public class RoleForm extends BaseForm {
    @Id
    @KeyField("role_id")
    private String roleId;
    @NotBlank(message = "角色名称不能为空")
    @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
    @ValidField(msg="角色名称不能重复",column = "role_name")
    private String roleName;
    @ValidField(msg="权限字符不能重复",column = "role_key")
    @NotBlank(message = "权限字符不能为空")
    private String roleKey;
    @NotNull(message = "显示顺序不能为空")
    private Integer roleSort;
    private String dataScope;
    private boolean menuCheckStrictly;
    private boolean deptCheckStrictly;
    private String status;
    private String remark;
    /** 菜单组 */
    private String[] menuIds;

    /** 部门组（数据权限） */
    private String[] deptIds;
}
